package com.zcy.service.impl;

import com.zcy.annotation.HessianService;
import com.zcy.entity.EntityInfo;
import com.zcy.service.IEntityInfoService;
import com.zcy.service.spi.BaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.Entity;
import java.util.ArrayList;
import java.util.List;

@HessianService(value = "/metadata/entityapi")
@Service
@Transactional
public class EntityInfoService extends BaseService<EntityInfo> implements IEntityInfoService {


    @Override
    public List<EntityInfo> save(List<EntityInfo> entitys) {
        List<EntityInfo> rs = new ArrayList<EntityInfo>();

        Iterable<EntityInfo> iterable = this.getDao().save(entitys);
        for (EntityInfo entity : entitys){
            rs.add(entity);
        }
        return rs;
    }
}
